<template>
  <div style="margin-bottom: 55px">
    <mt-header fixed title="油价资讯"> </mt-header>
    <!-- 单一文章信息开始 -->
    <div style="margin-top: 10vh">
      <div class="articleItem" v-for="o in data" :key="o.mid">
        <!-- 文章标题开始 -->
        <div class="header">{{ o.mtitle }}</div>
        <!-- 文章标题结束 -->
        <!-- 文章图文信息开始 -->
        <div class="wrapper">
          <!-- 文章简介开始 -->
          <div class="articleDes">
            {{ o.mcontent }}
          </div>
          <!-- 文章简介结束 -->
        </div>
        <!-- 文章图文信息结束 -->
      </div>
    </div>
    <!-- 单一文章信息结束 -->
  </div>
</template>

<script>
export default {
  data() {
    return {
      data: [],
    };
  },
  mounted() {
    const url = "v1/swiper";
    this.axios.get(url).then((res) => {
      console.log(res);
      this.data = res.data;
    });
  },
};
</script>

<style scoped>
.mint-header {
  height: 10vh;
  background-color: #db261d;
  font-size: 1.4em;
}
.mint-tabbar > .mint-tab-item.is-selected {
  color: #db261d;
}
.articleItem {
  padding: 10px 0;
  margin: 0 10px;
  border-bottom: 1px solid #999;
}
.header {
  font-weight: 600;
  font-size: 17px;
  color: #db261d;
  line-height: 22px;
}
.wrapper {
  display: flex;
  align-items: center;
  padding-top: 10px;
  width: 100%;
}
.articleDes {
  height: 65px;
  font-size: 15px;
  overflow: hidden;
  font-weight: 400;
  text-overflow: ellipsis;
  line-height: 21px;
  letter-spacing: normal;
  color: #444;
}
</style>
